from setuptools import setup, find_packages
import sys, os

if sys.version_info < (2, 4):
    raise SystemExit("Python 2.4 or later is required")

execfile(os.path.join("clutch", "release.py"))

setup(
    name='Clutch',
    version=version,
    description=description,
    long_description=long_description,
    classifiers=[],
    keywords='turbogears pylons',
    author=author,
    author_email=email,
    url=url,
    license=license,
    packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
    include_package_data=True,
    zip_safe=False,
    install_requires=[
        'Genshi>=0.4',
        'SQLAlchemy>=0.4'
    ],
    extras_require={
        'core-testing':["nose", "TurboKid", "TurboJson"]
    },
    entry_points='''
    [clutch.application]
    admin = clutch.admin:Config
    identity = clutch.identity:Config

    [paste.app_install]
    admin = clutch.admin:Installer
    identity = clutch.identity:Installer

    [paste.app_factory]
    main = clutch.wsgi:make_app_main

    [paste.paster_create_template]
    application = clutch.templates:ApplicationTemplate
    project = clutch.templates:ProjectTemplate

    [paste.global_paster_command]
    
    [paste.paster_command]
    list = clutch.command:ListCommand
    setup = clutch.command:SetupCommand
    mount = clutch.command:MountCommand
    unmount = clutch.command:UnmountCommand
    umount = clutch.command:UnmountCommand
    reload = clutch.command:ReloadCommand
    refresh = clutch.command:RefreshCommand
    shell = clutch.command:ShellCommand

    [paste.filter_app_factory]
    session = clutch.middleware:make_session_middleware
    cache = clutch.middleware:make_cache_middleware
    transaction = clutch.middleware:make_transaction_middleware
    http_error = clutch.middleware:make_http_error_middleware
    dbsession = clutch.middleware:make_dbsession_middleware
    errordocument = clutch.middleware:make_errordoc_middleware
    ''',
    )
##    entry_points='''
##        [paste.paster_create_template]
##        turbogears2=tg.pastetemplate:TurboGearsTemplate
##        [paste.global_paster_command]
##        tginfo = tg.commands.info:InfoCommand
##        quickstart = tg.commands.quickstart:QuickstartCommand
        
##        [turbogears2.template]
##        turbogears2=tg.pastetemplate:TurboGearsTemplate
##        [turbogears2.command]
##        tginfo = tg.commands.info:InfoCommand
##        quickstart = tg.commands.quickstart:QuickstartCommand
##        serve = paste.script.serve:ServeCommand [Config]
##        shell = pylons.commands:ShellCommand
##    ''',

